Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [IOCOM-864,IOCOM-865] Update message attachment's preview with the new DS #5428

Merged
merged 16 commits into from
Jan 26, 2024

Conversation

Vangaorth
Copy link
Contributor

@Vangaorth Vangaorth commented Jan 23, 2024

Short description

This PR updates the message attachment's preview screen to the new DS system.

Preview Data Error Preview Error
Simulator Screenshot - iPhone 14 - 2024-01-23 at 18 54 24 Simulator Screenshot - iPhone 14 - 2024-01-23 at 18 53 46 Simulator Screenshot - iPhone 14 - 2024-01-23 at 18 57 06

List of changes proposed in this pull request

  • New screen and components, referencing the new design system's components only
  • Removed in-preview attachment download

How to test

Using the io-dev-api-server, download some attachment. After that, enable the new DS and navigate to previously downloaded attachments to see the new DS. Check both Android and iOS. Check both success and failure cases.

@pagopa-github-bot pagopa-github-bot changed the title [IOCOM-864,IOCOM-865] Update message attachment's preview with the new DS feat: [IOCOM-864,IOCOM-865] Update message attachment's preview with the new DS Jan 23, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Jan 23, 2024

Affected stories

  • 🌟 IOCOM-864: [App] Rimuovere logica del download
    subtask of
    • IOCOM-813: Adottare il nuovo design system nella schermata di visualizzazione allegato di un messaggio IO
  • 🌟 IOCOM-865: [App] Adattare UI visualizzazione allegato
    subtask of
    • IOCOM-813: Adottare il nuovo design system nella schermata di visualizzazione allegato di un messaggio IO

Generated by 🚫 dangerJS against 6bf3b8c

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 89 lines in your changes are missing coverage. Please review.

Comparison is base (4b708e4) 47.35% compared to head (6bf3b8c) 47.35%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5428      +/-   ##
==========================================
- Coverage   47.35%   47.35%   -0.01%     
==========================================
  Files        1510     1512       +2     
  Lines       32076    32166      +90     
  Branches     7846     7860      +14     
==========================================
+ Hits        15190    15231      +41     
- Misses      16828    16876      +48     
- Partials       58       59       +1     
Files Coverage Δ
ts/components/LoadingSpinnerOverlay.tsx 100.00% <100.00%> (ø)
ts/components/ui/BoxedRefreshIndicator.tsx 100.00% <100.00%> (ø)
ts/components/ui/Overlay.tsx 100.00% <100.00%> (+10.00%) ⬆️
ts/features/messages/analytics/index.ts 44.77% <ø> (ø)
...ssageAttachment/LegacyMessageAttachmentPreview.tsx 47.43% <100.00%> (ø)
...essages/components/MessageAttachment/PdfViewer.tsx 45.45% <100.00%> (ø)
...atures/messages/components/MessageDetail/index.tsx 54.00% <100.00%> (+0.93%) ⬆️
ts/features/messages/store/reducers/downloads.ts 96.87% <100.00%> (+10.66%) ⬆️
ts/features/pn/screens/AttachmentPreviewScreen.tsx 5.00% <0.00%> (ø)
...features/messages/navigation/MessagesNavigator.tsx 20.00% <0.00%> (-13.34%) ⬇️
... and 3 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b708e4...6bf3b8c. Read the comment docs.

@dmnplb
Copy link
Contributor

dmnplb commented Jan 24, 2024

@Vangaorth I know it's still a draft PR, but just some notes after playing with it :)

  • PDF Preview Screen: Unless we have different logic between the old and new screens, it's better to keep a single page and let the components do their job. In fact, each new UI chunk responds to the isExperimental value. For example, if you use HeaderSecondLevel (with react-navigation) the header title is rendered with Titillium in the legacy version and with the new (temporary) Readex in the new one.
  • That said, I'd avoid the DS prefix because it's a way to separate the Design System pages from the others.
  • For the failure/success screens, take a look at the OperationResultScreen. It's completely configurable and it's already tested in different environments. Do not add the new component DSInfoScreen... if possible.
  • The new FooterWithButtons should be improved because it has spacing issues, as you can see from the attached screenshots. When there's the home indicator (iPhone X and up), the button is too close to the screen, but when we add a SafeAreaView, it's too distant. It's something we have to solve through some changes to the io-app-design-system library.

@Vangaorth
Copy link
Contributor Author

Vangaorth commented Jan 24, 2024

  • PDF Preview Screen: Unless we have different logic between the old and new screens, it's better to keep a single page and let the components do their job. In fact, each new UI chunk responds to the isExperimental value. For example, if you use HeaderSecondLevel (with react-navigation) the header title is rendered with Titillium in the legacy version and with the new (temporary) Readex in the new one.
  • That said, I'd avoid the DS prefix because it's a way to separate the Design System pages from the others.
  • For the failure/success screens, take a look at the OperationResultScreen. It's completely configurable and it's already tested in different environments. Do not add the new component DSInfoScreen... if possible.
  • The new FooterWithButtons should be improved because it has spacing issues, as you can see from the attached screenshots. When there's the home indicator (iPhone X and up), the button is too close to the screen, but when we add a SafeAreaView, it's too distant. It's something we have to solve through some changes to the io-app-design-system library.
  1. Replaced with existing components (that have been updated in order to use the new DS if it is enabled)
  2. That is a choice we made for the DS porting. As soon as the new DS replaces the existing one, we will remove legacy files and rename the new ones
  3. Very good indeed, replaced
  4. Will update the library as soon as a new release is made available

@Vangaorth Vangaorth marked this pull request as ready for review January 25, 2024 09:29
@Vangaorth Vangaorth requested a review from a team as a code owner January 25, 2024 09:29
@Vangaorth Vangaorth merged commit 18f8cb3 into master Jan 26, 2024
8 checks passed
@Vangaorth Vangaorth deleted the IOCOM-864-865-dsPreviewAttachment branch January 26, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants